<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;

class CreateGoldProductsTable extends Migration
{
    public function up()
    {
        Schema::create('gold_products', function (Blueprint $table) {

        	$table->id();

	        $table->unsignedBigInteger('gold_seed_id')->default(0)->index();
	        $table->unsignedBigInteger('gold_round_id')->default(0)->index();

            $table->dateTime('started_at')->nullable();
            $table->dateTime('disabled_at')->nullable();

            $table->timestamps();
	        $table->index(['created_at']);
        });
    }

    public function down()
    {
        Schema::dropIfExists('gold_products');
    }
}
